#ifndef PREPACKAGE_H
#define PREPACKAGE_H
#include<QString>
#include<QDir>
#include<Util/PathUtil.h>
#include<QDebug>
#include<QWidget>
#include<QFileInfo>
#include<Util/handlefile.h>
#include<Util/get_setInfo.h>
#include<Util/datautil.h>
#include<UI/packagerui.h>
#include<Util/dccinfo.h>
#include<Util/CodeHandle.h>
#include<QFileDialog>
#include<QProcess>
#include<QObject>
#include<Util/CmdProcess.h>
class PrePackage :public QObject
{
    Q_OBJECT
public:
    explicit PrePackage(PackagerUI *pUI, QString DirPath,QObject *parent = 0);
    bool initDirPath();
    bool PreProject(QString FilePath, QString ProjectRelativePath); //exe or fold
    bool PreConversionMethods(const QMap<int, DCCInfo *> *mDCCInfoMap);
    bool PreMdl(QString MdlFilePath);  //Prepare mdl file
    bool PreFilesInTable(); //Prepare all file in tables
    bool PreLicense();
    bool PrePackageConfig(QString Host,
                                           QString Port,
                                           QString Type,
                                           QString JarRelativePath,
                                           QString MdlRelativePath,
                                           QString TestDataStr);
    bool PreModelRunLib();
    bool PreJar(QString jarName);
    bool PreZip(QString mFileName );
signals:
    void sendStateInfo(QString);
private:
    QString mDirPath;
    QString mCurrentMdlPath;
    const QMap<int, DCCInfo *> *mDCCInfoMap;
    DataUtil *mDataUtil;
    PackagerUI *mUI;

};

#endif // PREPACKAGE_H
